package com.golang.gateway.domain;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

/**
 * redis中保存的tokenUser
 */
@Data
public class TokenUserInfo {


    private Long id;

    private String uid;

    private String realName;

    private String email;

    private String userName;

    private String phoneNo;

    private String photo;


    @Override
    public String toString() {
        ObjectMapper mapper = new ObjectMapper();
        try {
            return mapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
            return null;
        }
    }

}
